package com.lwj.mapper.administration;

import com.lwj.dto.administration.UserListDto;
import com.lwj.model.administration.User;
import com.lwj.vo.administration.UserVo;
import com.lwj.vo.configuration.DepartmentInfo;
import com.lwj.vo.configuration.RoleInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(String empId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(String empId);

    UserVo selectUserVo(String empId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    UserVo selectByNameAndPassword( User user );

    List<UserVo> selectUserByDepartmentId(UserListDto dto);

    DepartmentInfo selectDepartmentInfoByEmpId(@Param("empId")String empId);

    List<RoleInfo> selectRolesByEmpId(@Param("empId")String empId);
}
